package com.woniuxy.service.impl;

import com.github.pagehelper.PageInfo;
import com.woniuxy.commons.utils.ResStatus;
import com.woniuxy.commons.utils.ResponseResult;
import com.woniuxy.dao.RefundOrderDao;
import com.woniuxy.entity.RefundOrder;
import com.woniuxy.entity.RegisteredOrder;
import com.woniuxy.service.RefundOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RefundOrderServiceImpl implements RefundOrderService {
    @Resource
    RefundOrderDao refundOrderDao;
    @Override
    public ResponseResult findAll(int currentPage, int pageSize) {
        List<RefundOrder> list = refundOrderDao.findAll();
        PageInfo<RefundOrder> pageInfo = PageInfo.of(list);
        ResponseResult responseResult = new ResponseResult<>();

        responseResult.setData(pageInfo);

        responseResult.setCode(200);

        responseResult.setMsg("查询成功");

        responseResult.setStatus(ResStatus.SUCCESS);

        return responseResult;
    }
}
